<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class EnterpricePowerusersBase extends Model {

	//
	protected $table = 'enterprice_powerusers_base';
	protected $fillable = ['company_name','legal_person','regist_time','regist_capital','regist_province','regist_city','regist_area','regist_address','zcode','fax','regist_code','group_code','contact_person','contact_number','email','induction','enterprice_char','uid','enterprice_pic','regist_copy','group_code_img', 'logo', 'description'];

	public function province()
	{
		return $this->hasOne("App\Models\Area", "area_id", "regist_province");
	}

	public function registProvince()
	{
		return $this->hasOne("App\Models\Area", "area_id", "regist_province");
	}

	public function registCity()
	{
		return $this->hasOne("App\Models\Area", "area_id", "regist_city");
	}

	public function registArea()
	{
		return $this->hasOne("App\Models\Area", "area_id", "regist_area");
	}


}
